import request from '@/utils/request'
// 获取部门列表
export function getDepartments() {
  return request({
    url: '/company/department'
  })
}

// 新增部门
export function addDepartments(data) {
  return request({
    url: '/company/department',
    method: 'post',
    data
  })
}// 获取部门详情数据
export function getDepartmentDetail(id) {
  return request({
    url: `/company/department/${id}`

  })
}
// 删除一个部门

export function delDepartment(id) {
  return request({
    url: `/company/department/${id}`,
    method: 'delete'

  })
}
